~4Dgifts/toolbox/src/exampleCode/X/fonts README glyph.c: A simple example of changing a window's cursor using "Glyph" cursors. A "Glyph" is just a character from one of the many text fonts that X knows about. The size of your new glyph cursor is determined by the pixel size in the font's name. This example should probably call `XQueryBestCursor()' to find the "best" (or at least the biggest usable) cursor size, but it simply arbitrarily chooses an Helvetica font with a pixel size of 25. Note that some of the "character positions" in the array defining the characters in a font may be undefined, and among other things, a cursor must have non-zero width. So, after you load the font you've chosen, you need to query the "text extents" of each of the characters that might be defined in the font. Also note that the first glyph cursor "displayed" by the program is the space character which has a width, but doesn't display a very interesting cursor. scalable.c: This file contains a few simple examples of using scalable fonts which were new to X11R5. There are now two types of fonts: bitmap fonts and "derived instances of scalable fonts". Note that for a particular font specification it's not possible to determine whether the font actually displayed is a bitmap font or a derived instance of a scalable font. In a list of fonts, the name string of a scalable font will have a `0' in the PIXEL_SIZE, POINT_SIZE, and AVERAGE_WIDTH fields. When you specify a font name with wildcards, for scalable fonts, you must provide a "well-formed" name. A "well-formed" name is one in which you specify all 14 hyphens in the name string. To choose a scalable font, put `0' in the PIXEL_SIZE, POINT_SIZE, and AVERAGE_WIDTH fields. For example, "-*-helvetica-medium-r-*-*-0-0-*-*-*-0-*-*" is a "well-formed" name. A name that doesn't contain all 14 hyphens, like: "-*-helvetica-medium-r-*" is not. The source file includes an example of using scalable fonts, and some utility functions to help select a scalable font, determine whether a font specification is "well-formed", and a few others. See the comments in the source for more information. See also, chapter 2 of the O'Reilly book: "Programmer's Supplement for Release 5 of the X Window System, Version 11", by David Flanagan.
Source
Documentation
Reference